Repository navigation
docs(api): calendar event days, range delete and optional summary - #1054
Merged
Merged
Conversation
- /calendar/event/list returns days: the resolved state of every day in the scope (is_off, event_id, layer), decided by the calendar's own events, then linked holiday calendars, then weekly workdays. - /calendar/event/delete clears a date range when start_at and end_at are given instead of event_id. - /calendar/event/upsert: summary is optional; a write trims the calendar's other own events off the same days; end_at must be later than start_at. - Service calendar guide: date-range adjustment from the action bar and how overlapping settings are resolved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Bring the calendar event API reference and the service calendar guide in line with current behavior.
API reference (
openapi.{en,zh}.json,on-call.openapi.{en,zh}.json)POST /calendar/event/list: response addsdays, keyed byYYYY-MM-DD, each a newCalDay(is_off,event_id,layer=custom/holiday/weekly). The description states the resolution order: the calendar's own events, then linked holiday calendars, then weekly workdays; inside a layer a working-day event beats a day off.POST /calendar/event/delete:event_idis now optional;start_at+end_atclear the calendar's own events off[start_at, end_at). Exactly one of the two forms.POST /calendar/event/upsert:summaryis optional (nominLength); the description covers how a write trims the calendar's other own events on the same days, and thatend_atmust be later thanstart_at.Guide (
{zh,en}/on-call/configuration/service-calendar.mdx)Checks
python3 scripts/lint_openapi.py→OK: 12 spec files, no violationsmint broken-links→ no broken links